﻿using System;
using System.Reflection;
using System.Collections.Generic;

namespace NetFramework.DataAccess.EntityBuilder
{
    internal class ReferenceBindingInfo
    {
        private PropertyInfo property;
        private Type type;

        public ReferenceBindingInfo(string prefix, PropertyInfo property)
        {
            this.PrefixName = prefix;
            this.property = property;
            this.type = property.PropertyType;
        }

        public string PrefixName
        {
            get;
            private set;
        }

        public EntityBindingInfo EntityBindingInfo
        {
            get;
            set;
        }

        public Type Type
        {
            get { return type; }
        }

        public void SetValue(object obj, object value)
        {
            this.property.SetValue(obj, value, null);
        }
    }
}
